package com.lotusfall.pojo;
 
public class UserContext {
    private static ThreadLocal<User> userHolder = new ThreadLocal<User>();
 
    public static void setUser(User loginUser) {
        userHolder.set(loginUser);
    }
 
    public static User getUser() {
        return userHolder.get();
    }
 
    public static void clear() {
        userHolder.remove();
    }
}